package com.supreme.secretserver.props;

import lombok.Data;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

@Data
@Configuration
@ConfigurationProperties(prefix = "supreme.encrypt")
public class EncryptProps {

    @Value("www.majewing.com")
    private String aesKey;

    private String rsaPubKey;

    private String rsaPriKey;

    public byte[] getAesKeyBytes() {
        return aesKey.getBytes();
    }

    public byte[] getRsaPubKeyBytes() {
        return rsaPubKey.getBytes();
    }

    public byte[] getRsaPriKeyBytes() {
        return rsaPriKey.getBytes();
    }
}
